<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%order_owner}}".
 *
 * @property int $ot_id
 * @property int $ot_oid 单号
 * @property string $ot_residence_pro 户籍省份
 * @property string $ot_residence_city 户籍市
 * @property string $ot_residence_area 户籍区域
 * @property string $ot_edu 学历
 * @property string $ot_mobile 手机号
 * @property string $ot_married
 * @property string $ot_bankcard 银行卡号
 * @property string $ot_liveadd 居住地
 * @property string $ot_tel 固定电话
 * @property string $ot_home_add 实际家庭居住地
 * @property string $ot_house_add 房产地址
 * @property string $ot_house_owner 房屋所有权人
 * @property string $ot_hown_relation 房产所有权人与购车人关系
 * @property string $ot_house_nature 房产性质
 * @property string $ot_house_acreage 房产面积
 * @property string $ot_house_price 房屋市价
 * @property string $ot_house_loan 房贷金额
 * @property string $ot_house_loyear 房贷年限
 * @property string $ot_house_refundmo 房贷月还款
 * @property string $ot_company 公司名
 * @property string $ot_company_add 单位地址
 * @property string $ot_company_tel 单位电话
 * @property string $ot_company_type 单位类型
 * @property string $ot_duty_type 职务类型
 * @property string $ot_duty 职务
 * @property string $ot_operat_period 经营期限
 * @property string $ot_seniority 工龄
 * @property string $ot_stake 所占股份
 * @property string $ot_income_month 月收入
 * @property string $ot_contact 紧急联系人
 * @property string $ot_remark
 * @property string $ot_status
 * @property int $ot_dateline 录入时间
 * @property string $ot_checkin_date 房屋入住时间
 * @property string $ot_hiredate 入职时间
 */
class OrderOwner extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%order_owner}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ot_oid', 'ot_residence_pro', 'ot_residence_city', 'ot_residence_area', 'ot_edu', 'ot_mobile', 'ot_married', 'ot_bankcard', 'ot_liveadd', 'ot_tel', 'ot_home_add', 'ot_house_add', 'ot_house_owner', 'ot_hown_relation', 'ot_house_nature', 'ot_house_acreage', 'ot_house_price', 'ot_house_loan', 'ot_house_loyear', 'ot_house_refundmo', 'ot_company_add', 'ot_company_tel', 'ot_company_type', 'ot_duty_type', 'ot_duty', 'ot_operat_period', 'ot_seniority', 'ot_stake', 'ot_income_month', 'ot_contact', 'ot_remark', 'ot_status', 'ot_dateline'], 'required'],
            [['ot_oid', 'ot_dateline'], 'integer'],
            [['ot_house_acreage', 'ot_house_price', 'ot_house_loan', 'ot_house_refundmo', 'ot_stake', 'ot_income_month'], 'number'],
            [['ot_contact', 'ot_status'], 'string'],
            [['ot_checkin_date', 'ot_hiredate'], 'safe'],
            [['ot_residence_pro', 'ot_residence_city', 'ot_residence_area', 'ot_edu', 'ot_bankcard', 'ot_tel', 'ot_house_owner', 'ot_hown_relation', 'ot_house_nature', 'ot_company', 'ot_company_type', 'ot_duty_type', 'ot_duty', 'ot_operat_period', 'ot_seniority'], 'string', 'max' => 30],
            [['ot_mobile', 'ot_married', 'ot_house_loyear', 'ot_company_tel'], 'string', 'max' => 20],
            [['ot_liveadd', 'ot_company_add'], 'string', 'max' => 50],
            [['ot_home_add', 'ot_house_add'], 'string', 'max' => 100],
            [['ot_remark'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ot_id' => Yii::t('app', 'Ot ID'),
            'ot_oid' => Yii::t('app', '单号'),
            'ot_residence_pro' => Yii::t('app', '户籍省份'),
            'ot_residence_city' => Yii::t('app', '户籍市'),
            'ot_residence_area' => Yii::t('app', '户籍区域'),
            'ot_edu' => Yii::t('app', '学历'),
            'ot_mobile' => Yii::t('app', '手机号'),
            'ot_married' => Yii::t('app', 'Ot Married'),
            'ot_bankcard' => Yii::t('app', '银行卡号'),
            'ot_liveadd' => Yii::t('app', '居住地'),
            'ot_tel' => Yii::t('app', '固定电话'),
            'ot_home_add' => Yii::t('app', '实际家庭居住地'),
            'ot_house_add' => Yii::t('app', '房产地址'),
            'ot_house_owner' => Yii::t('app', '房屋所有权人'),
            'ot_hown_relation' => Yii::t('app', '房产所有权人与购车人关系'),
            'ot_house_nature' => Yii::t('app', '房产性质'),
            'ot_house_acreage' => Yii::t('app', '房产面积'),
            'ot_house_price' => Yii::t('app', '房屋市价'),
            'ot_house_loan' => Yii::t('app', '房贷金额'),
            'ot_house_loyear' => Yii::t('app', '房贷年限'),
            'ot_house_refundmo' => Yii::t('app', '房贷月还款'),
            'ot_company' => Yii::t('app', '公司名'),
            'ot_company_add' => Yii::t('app', '单位地址'),
            'ot_company_tel' => Yii::t('app', '单位电话'),
            'ot_company_type' => Yii::t('app', '单位类型'),
            'ot_duty_type' => Yii::t('app', '职务类型'),
            'ot_duty' => Yii::t('app', '职务'),
            'ot_operat_period' => Yii::t('app', '经营期限'),
            'ot_seniority' => Yii::t('app', '工龄'),
            'ot_stake' => Yii::t('app', '所占股份'),
            'ot_income_month' => Yii::t('app', '月收入'),
            'ot_contact' => Yii::t('app', '紧急联系人'),
            'ot_remark' => Yii::t('app', 'Ot Remark'),
            'ot_status' => Yii::t('app', 'Ot Status'),
            'ot_dateline' => Yii::t('app', '录入时间'),
            'ot_checkin_date' => Yii::t('app', '房屋入住时间'),
            'ot_hiredate' => Yii::t('app', '入职时间'),
        ];
    }
}
